/*
 * NcsLogger.h
 *
 *  Created on: Jun 24, 2017
 *      Author: zjf
 */

#ifndef INCLUDE_NCSLOGGER_H_
#define INCLUDE_NCSLOGGER_H_

#include <Poco/Logger.h>

using namespace Poco;

namespace Logger
{

Poco::Logger *_logger = nullptr;
Poco::Logger& getLogger(std::string name);

void initLogger(std::string& file);
inline Poco::Logger& getLogger(std::string name = "")
{
	if (_logger == nullptr)
	{
		_logger = &Poco::Logger::get(name);
	}

	return *_logger;
}

#define poco_info(x, ...) poco_information(getLogger(), argvs...)

}


#endif /* INCLUDE_NCSLOGGER_H_ */
